﻿using System;
using System.Net.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ERP.Blazor.Menus;
using Volo.Abp.Modularity;
using ERP.Blazor.Services;
using System.Threading.Tasks;
using ERP.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Microsoft.Extensions.Hosting;
using AntDesign.ProLayout;

namespace ERP.Blazor;
[DependsOn(
    typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule)
)]
public class ERPBlazorUIModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext builder)
    {


        builder.Services.AddAntDesign();
        //builder.Services.Configure<ProSettings>(builder.Services.Configuration.GetSection("ProSettings"));
        builder.Services.AddScoped<IChartService, ChartService>();
        builder.Services.AddScoped<IProjectService, ProjectService>();
        builder.Services.AddScoped<IUserService, UserService>();
        builder.Services.AddScoped<IAccountService, AccountService>();
        builder.Services.AddScoped<IProfileService, ProfileService>();


    }
    private static void ConfigureHttpClient(ServiceConfigurationContext context)
    {
        context.Services.AddTransient(sp => new HttpClient
        {
            //BaseAddress = new Uri(environment.BaseAddress)
        });
    }
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        base.PreConfigureServices(context);
    }
   
  
 
 
  
}
